package net.xju.service.impl;

import net.xju.dao.WorkDao;
import net.xju.entity.Work;

import java.sql.SQLException;

public class WorkServiceImpl {

    WorkDao workDao = new WorkDao();
    public void insert(Work work) {
        workDao.insert(work);
    }

    public Work queryByUsername(String username) {
        return workDao.queryByUsername(username);
    }

    public void deleteInFact(String username) {
        workDao.deleteInFact(username);
    }

    public boolean updateByUsername(Work work) {
        return workDao.updateByUsername(work);
    }

    public long countWork(String type) throws SQLException {
        return workDao.countWork(type);
    }
}
